package com.project.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the Property_Image database table.
 * 
 */
@Entity
@Table(name="Property_Image")
@NamedQueries({
	@NamedQuery(name = "Property_Image.findIMGPath", query = "SELECT img.path FROM Property_Image img WHERE img.property.propID = :propID"),
})
public class Property_Image implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ImageID")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int imageID;

	@Column(name="Path")
	private String path;

	//bi-directional many-to-one association to Property
    @ManyToOne
	@JoinColumn(name="PropID",referencedColumnName="PropID",nullable=false)
	private Property property;

    public Property_Image() {
    }

	public int getImageID() {
		return this.imageID;
	}

	public void setImageID(int imageID) {
		this.imageID = imageID;
	}

	public String getPath() {
		return this.path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Property getProperty() {
		return this.property;
	}

	public void setProperty(Property property) {
		this.property = property;
	}
	
}